package com.guinea.datadb.mongo;

import java.io.Serializable;
import java.util.List;

import com.guinea.web.model.Mime_types;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Version;
import org.springframework.data.mongodb.core.mapping.Document;


/**
 * @author: shiky
 * @describle:  上传文件配置
 * @dateTime: 2016/2/25
 */
@Document
public class UploadConfig implements Serializable{

    private static final long serialVersionUID = 5697783640222596535L;

    @Id
    private String id;

    //单个文件上传大小限制
    private Integer fileMaxSize;

    //每次上传大小限制
    private Integer allMaxSize;

    //缓存大小
    private Integer cacheSize;

    //保存路径
    private String savePath;

    //是否重命名
    private Short isReName=Short.valueOf("1");

    //是否拖拽
    private Short isDragdrop=Short.valueOf("1");

    //文件后缀限制
    private List<Mime_types> mime_types;

    @Version
    private Long version;


    public Integer getFileMaxSize() {
        return fileMaxSize;
    }

    public Integer getAllMaxSize() {
        return allMaxSize;
    }

    public String getSavePath() {
        return savePath;
    }

    public Short getIsReName() {
        return isReName;
    }

    public Short getIsDragdrop() {
        return isDragdrop;
    }

    public Long getVersion() {
        return version;
    }

    public void setFileMaxSize(Integer fileMaxSize) {
        this.fileMaxSize = fileMaxSize;
    }

    public void setAllMaxSize(Integer allMaxSize) {
        this.allMaxSize = allMaxSize;
    }

    public void setSavePath(String savePath) {
        this.savePath = savePath;
    }

    public void setIsReName(Short isReName) {
        this.isReName = isReName;
    }

    public void setIsDragdrop(Short isDragdrop) {
        this.isDragdrop = isDragdrop;
    }

    public void setVersion(Long version) {
        this.version = version;
    } 

    public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

    public Integer getCacheSize() {
        return cacheSize;
    }

    public void setCacheSize(Integer cacheSize) {
        this.cacheSize = cacheSize;
    }

    public List<Mime_types> getMime_types() {
        return mime_types;
    }

    public void setMime_types(List<Mime_types> mime_types) {
        this.mime_types = mime_types;
    }

    public String toString() {
        return ReflectionToStringBuilder.toString(this);
    }
}
